Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add update&replace api #131

Merged
merged 10 commits into from
Dec 14, 2023
Merged

add update&replace api #131

merged 10 commits into from
Dec 14, 2023

Conversation

Jacyking
Copy link
Collaborator

No description provided.

@codecov-commenter
Copy link

codecov-commenter commented Dec 13, 2023

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (899f2e6) 40.56% compared to head (e140556) 42.10%.

Files Patch % Lines
include/utility.hpp 93.75% 3 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #131      +/-   ##
==========================================
+ Coverage   40.56%   42.10%   +1.54%     
==========================================
  Files          22       22              
  Lines        2894     2978      +84     
==========================================
+ Hits         1174     1254      +80     
- Misses       1720     1724       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@qicosmos
Copy link
Owner

另外没啥没看到测试,pr介绍也没有。

Copy link
Owner

@qicosmos qicosmos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

if (condition && type == OptType::update) {
iguana::for_each(t, [&t, &param_binds, this](auto item, auto i) {
if (is_conflict_key<T>(
"`" + std::string(iguana::get_name<T>(i).data()) + "`")) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要用连加,效率低。


template <typename T, typename... Args>
int insert_impl(OptType type, const std::vector<T> &v, bool get_insert_id,
Args &&...args) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

args是多余的吗,没看到哪里有用到?

@@ -463,9 +486,38 @@ class sqlite {
}

template <typename T, typename... Args>
int insert_impl(bool update, const T &t, bool get_insert_id = false,
int insert_impl(OptType type, const T &t, bool get_insert_id,
Args &&...args) {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

args没用到?

}

template <typename T, typename... Args>
int insert_impl(OptType type, const std::vector<T> &v, bool get_insert_id,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

args没用到

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

评论看不到?

@Jacyking Jacyking merged commit df75b98 into qicosmos:master Dec 14, 2023
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants